fix(react-router): resolve relative route matching inside root-level splat routes#30861
Merged
ShaneK merged 5 commits intofix/react-router-6-pathsfrom Dec 12, 2025
Merged
Conversation
…c-framework into fix/react-router-6-splat-links
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
thetaPC
approved these changes
Dec 11, 2025
...ages/react-router/test/base/src/pages/nested-tabs-relative-links/NestedTabsRelativeLinks.tsx
Show resolved
Hide resolved
brandyscarney
approved these changes
Dec 12, 2025
...ages/react-router/test/base/src/pages/nested-tabs-relative-links/NestedTabsRelativeLinks.tsx
Outdated
Show resolved
Hide resolved
Member
Author
|
@ptmkenny were you able to verify if this fixes your issue? |
|
@ShaneK I haven't been able to confirm this in my app yet because of other issues, some of which I think have been fixed in other PRs. My testing is also a little delayed due to the holiday period. Is there a new build of the main react-router 6 PR that includes all the fixes committed so far? |
Member
Author
|
@ptmkenny Everything has been merged back into the main RR6 PR. The current dev build is |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue number: resolves internal
What is the current behavior?
Routes with relative paths (e.g.,
path="tab1/*") inside root-level splat routes (path="*") do not match correctly. The parent path computation returns an incorrect value, causing routes to 404. Developers must use absolute paths (e.g.,path="/tab1/*") as a workaround.What is the new behavior?
Routes with relative paths now correctly match when the parent is a splat-only route. The
computeParentPathfunction checks at root level for embedded wildcard routes (liketab1/*) as a fallback when no match is found at deeper levels, allowing relative paths to work correctly inside splat route parents.Does this introduce a breaking change?
Other information
Current dev build: